<!DOCTYPE html>
<html>
  <!--
     - 1080p Geo-spatial Person Shuffle Dashboard
     -
     - Copyright (c) 2013 CIP Reporting
     - All rights reserved.
     - 
     - Redistribution and use in source and binary forms are permitted
     - provided that the above copyright notice and this paragraph are
     - duplicated in all such forms and that any documentation,
     - advertising materials, and other materials related to such
     - distribution and use acknowledge that the software was developed
     - by CIP Reporting.  The name of CIP Reporting may not be used to 
     - endorse or promote products derived from this software without 
     - specific prior written permission.
     -
     - THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
     - IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
     - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
     -
     -->
  <head>
    <meta charset="utf-8">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="1080p Geo-spatial Person Shuffle Dashboard">
    <meta name="author" content="">

    <title>1080p Geo-spatial Person Shuffle Dashboard</title>

    <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
    <link rel="icon" href="favicon.ico" type="image/x-icon" />

    <!-- Bootstrap -->
    <link href="../../lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom Styling -->
    <link href="style.css" rel="stylesheet">
    
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="../../lib/html5shiv.js"></script>
      <script src="../../lib/respond.min.js"></script>
    <![endif]-->
  </head>
  <body>
    <div id="container">
      <div class="initializing">
        <img src="logo_mono_blue_thin.png" />
        <img src="progress-bar.gif" />
        <p class="lead">Please wait, Initializing...</p>
      </div>
    </div>
    
    <!-- External librarys - jQuery, Bootstrap, log4javascript, etc. -->
    <script src="../../lib/jquery-2.0.3.js"></script>
    <script src="../../lib/jquery-ui.js"></script>
    <script src="../../lib/jquery.actual.js"></script>
    <script src="../../lib/jquery.image-scale.js"></script>
    <script src="../../lib/bootstrap/js/bootstrap.min.js"></script>
    <script src="../../lib/bootbox.min.js"></script>
    <script src="../../lib/holder.js"></script>
    <script src="../../lib/sprintf.js"></script>
    <script src="../../lib/OpenLayers/OpenLayers.js"></script>
    <script src="../../lib/log4javascript/log4javascript.js"></script>

    <script type="text/javascript">
      // Initialize logger
      (function() {
        var consoleAppender = new log4javascript.BrowserConsoleAppender();
        var patternLayout = new log4javascript.PatternLayout("%d{HH:mm:ss,SSS} %c %-5p - %m{1}%n");
        consoleAppender.setLayout(patternLayout);
 
        var rootLogger = log4javascript.getRootLogger();
        rootLogger.removeAllAppenders();
        rootLogger.addAppender(consoleAppender);
        rootLogger.setLevel(log4javascript.Level.ALL);
      })();
    </script>

    <!-- CIP CORS API Interface -->
    <script src="../../CIPAPI/credentials.js"></script>
    <script src="../../CIPAPI/config.js"></script>
    <script src="../../CIPAPI/router.js"></script>
    <script src="../../CIPAPI/rest.js"></script>
    <script src="../../CIPAPI/timing.js"></script>
    <script src="../../CIPAPI/settings.js"></script>
    <script src="../../CIPAPI/me.js"></script>

    <!-- CIP UI Components -->
    <script src="../../CIPAPI/screens/login.js"></script>
    <script src="../../CIPAPI/screens/logout.js"></script>
    <script src="../../CIPAPI/components/map.js"></script>

    <!-- Application Screens -->
    <script src="screens/main.js"></script>
    <script src="screens/main.single.js"></script>
    <script src="screens/main.tworow.js"></script>
    <script src="screens/main.fourcolumn.js"></script>

    <!-- Kick it off! -->
    <script type="text/javascript">
      // Default Configurations - which can be overriden by an integration
      CIPAPI.config.setDefaults({
           overrideIntegration: '1080p-geo-person-shuffle-cfg', // Name of integration to request for configuration override / merge
        reloadSettingsInterval: 'cipapi-timing-5min',           // How often to reload settings from the server
              reloadMeInterval: 'cipapi-timing-5min',           // How often to reload the current user info from the server
          reloadConfigInterval: 'cipapi-timing-5min',           // How often to reload the configuration override from the server
          firstShuffleInterval: 'cipapi-timing-5sec',           // How long to wait on the main screen to start the shuffle
               shuffleInterval: 'cipapi-timing-5min',           // How often to shuffle the view and layout
                singleInterval: 'cipapi-timing-5sec',           // How often to rotate the single layout
                twoRowInterval: 'cipapi-timing-10sec',          // How often to rotate the two row layout
            fourColumnInterval: 'cipapi-timing-15sec',          // How often to rotate the four column layout
             visualEasingTimer: 750,                            // Easing speed for animations
                  visualEaseIn: 'easeInQuint',                  // Easing in function
                 visualEaseOut: 'easeOutQuint',                 // Easing out function
              availableLayouts: {                               // Aviailable layouts - they key is important!
                      single: "Single", 
                      tworow: "Two Rows", 
                  fourcolumn: "Four Columns",
             },
             fieldRenderingMap: [                               // How to render person information
                'Demographics: %(gender)s %(race)s %(height)s %(weight)s',
                'Distance: %(distance)s Miles',
                'DOB: %(date_of_birth)s (%(age)s Years Old)',
                'Eye Color: %(eye_color)s',
                'Hair Color: %(hair_color)s',
                'Notes: %(comments)s'
        ]
      });
      
      $(document).ready(function() { $(document).trigger('cipapi-init'); });
    </script>
  </body>
</html>
